package edu.fzu.fundmgr.service.impl;

import java.util.List;

import edu.fzu.fundmgr.dao.ClientDao;
import edu.fzu.fundmgr.dao.impl.ClientDaoJDBCImpl;
import edu.fzu.fundmgr.domain.Client;
import edu.fzu.fundmgr.service.ClientService;

public class ClientServiceImpl implements ClientService {

	public void addClient(Client client) {
		
		ClientDao clientDao = new ClientDaoJDBCImpl();
		clientDao.addClient(client);
	}

	public List<Client> loadAll() {
		
		ClientDao clientDao = new ClientDaoJDBCImpl();
		return clientDao.loadAll();
	}

	public void removeClient(String idCardNO) {
		
		ClientDao clientDao = new ClientDaoJDBCImpl();
		clientDao.delClient(idCardNO);
	}

	public Client getClient(String idCardNO) {
		
		ClientDao clientDao = new ClientDaoJDBCImpl();
		return clientDao.getClient(idCardNO);
	}

	public void updateClient(Client client) {
		
		ClientDao clientDao = new ClientDaoJDBCImpl();
		clientDao.updateClient(client);
	}

}
